package com.unicom.si.service;

import com.unicom.si.security.pojo.CustomeUserDetail;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Component
public class UserService {

    @Value("${key}")
    private String key;

    @Transactional
    public CustomeUserDetail queryUserByName(String username) {
        CustomeUserDetail user = new CustomeUserDetail();
        user.setId(100);
        user.setUsername("zhangsan");
        user.setEmail("zhangsan@163.com");

        System.out.println("key ======= " + key);

        return user;
    }
}
